package com.us.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.nutz.log.Log;
import org.nutz.log.Logs;

import com.us.listener.operation.CreateDBAction;

/**
 * 这个累用于动态加载Vo类，记实体关系的类。不知道Nutz的启动的关系类如何
 * 
 * @author monlyu
 */
public class ContentLoadListener implements ServletContextListener {

    private static final Log log = Logs.getLog(ContentLoadListener.class);

    @Override
    public void contextDestroyed(ServletContextEvent event) {
    }

    @Override
    public void contextInitialized(ServletContextEvent event) {
        log.infof("扫描数据库");
        CreateDBAction.createDB();
    }

}
